﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using WcfService1.DTO;

namespace WcfService1
{
    // NOTE: You can use the "Rename" command on the "Refactor" SalesInvoice to change the interface name "ISalesInvoiceServices" in both code and config file together.
    [ServiceContract]
    public interface ISalesInvoiceServices
    {
        [OperationContract]
        List<SalesInvoiceDTO> GetList(int page, out long recordCount, string sortProperty = null,
                                      string sortType = "ASC");

        [OperationContract]
        bool Save(SalesInvoiceDTO SalesInvoice,bool isNew);

        [OperationContract]
        bool Delete(SalesInvoiceDTO SalesInvoice);

        [OperationContract]
        List<SalesInvoiceDTO> GetListByCriteria(Dictionary<String, Object> criteria, string expression, int page,
                                                out long recordCount);

        [OperationContract]
        List<SalesInvoiceDTO> GetAllSalesInvoice();

        [OperationContract]
        SalesInvoiceDTO GetSalesInvoice(string kodeSalesInvoice);

        [OperationContract]
        List<SalesInvoiceDTO> GetSalesInvoiceList(string kodeSalesInvoice);

        [OperationContract]
        string GetLastSINo(CostCenterDTO costCenter);

        [OperationContract]
        bool DeleteDetail(SalesInvoiceDetailDTO salesInvoiceDetailDTO);

        [OperationContract]
        void UpdateStatus(SalesInvoiceDTO salesInvoiceDto, Status status);

        [OperationContract]
        List<SalesInvoiceDTO> GetSalesInvoiceListByCostCenter(CostCenterDTO costCenter);


        [OperationContract]
        IEnumerable<SalesInvoiceDTO> GetSalesInvoiceByCustomer(CustomerDTO customer);


        [OperationContract]
        void Posting(IEnumerable<SalesInvoiceDTO> salesInvoiceDtos);

        [OperationContract]
        void UnPosting(IEnumerable<SalesInvoiceDTO> salesInvoiceDtos);

        [OperationContract]
        IEnumerable<SalesInvoiceDTO> GetListByPeriode(DateTime tglstart, DateTime tglend);
    }
}